package com.mit.web.vo.purchase
{
	import com.mit.web.vo.BaseVO;
	import com.mit.web.vo.design.FabricVO;
	import com.mit.web.vo.inventory.WarehouseVO;
	import com.mit.web.vo.maintenance.ProductColorVO;
	import com.mit.web.vo.manufacture.MOItemVO;
	import com.mit.web.vo.manufacture.MOVO;
	

	[Bindable]
	[RemoteClass(alias="com.mit.common.purchase.dto.POItemDTO")]
	public class POItemVO extends BaseVO
	{

		
		public var poId:int;
		public var moItem:MOItemVO;
		public var mo:MOVO;		
		public var fabric:FabricVO;
		public var supplierId:int;
		public var supplierName:String;
		public var material:MaterialVO;
		public var materialColor:ColorStyleVO;
		public var price:Number;
		public var unit:String;
		public var purchasedQty:Number;
		public var receivedQty:Number;
		public var qty:Number;
		public var warehouse:WarehouseVO;
		public var latestDeiverDate:Date;

		
		public function POItemVO()
		{
			super();
			moItem = new MOItemVO;
			mo = new MOVO();
			fabric = new FabricVO();			
			material = new MaterialVO();
			materialColor = new ColorStyleVO();
			warehouse = new WarehouseVO();
		}
		
		public function get estimatedTotalQty():Number{
			return moItem.totalOrderQty * fabric.amount;
		}
		
		public function get amt():Number{
			return qty * price;
		}
		
		public function get purchasedQtyFromOtherPO():Number{
			return purchasedQty - qty;
		}
	}
}